<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        body {
            perspective: 400px;
        }
        .box {
            position: relative;
            width: 200px;
            height: 200px;
            background-color: aqua;
            transition: all 1s;
            margin: 100px auto;
            /* 让背面的盒子保留立体空间，这个需要给父级元素添加 */
            /* transform-style: preserve-3d; */
        }

        .front, .back {
            position:absolute;
            top: 0px;
            left: 0px;
            width: 200px;
            height: 200px;
            text-align: center;
            line-height: 200px;
            font-size: 30px;
        }
        .front {
            background-color: orange;
            /* transform: translateZ(1px);
            backface-visibility: hidden; */
            z-index: 1;
        }
        .back {
            background-color: skyblue;
            transform: rotateY(180deg);
        }
        .box:hover {
            transform: rotateY(180deg);
        }

    </style>
</head>

<body>
    <div class="box">
        <div class="front">白马程序员</div>
        <div class="back">pink在等我</div>
    </div>

</body>

</html>